//
//  UIView+Frame.m
//  qiFenQi
//
//  Created by 戒了。 on 16/4/15.
//  Copyright © 2016年 xiaomage. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (CGFloat)nb_centerX
{
    return self.center.x;
}
- (void)setNb_centerX:(CGFloat)nb_centerX
{
    CGPoint center = self.center;
    center.x = nb_centerX;
    self.center = center;
}

- (CGFloat)nb_centerY
{
    return self.center.y;
}
- (void)setNb_centerY:(CGFloat)nb_centerY
{
    CGPoint center = self.center;
    center.y = nb_centerY;
    self.center = center;
}

- (CGFloat)nb_height
{
    return self.frame.size.height;
}

- (void)setNb_height:(CGFloat)nb_height
{
    CGRect rect = self.frame;
    rect.size.height = nb_height;
    self.frame = rect;
}

- (CGFloat)nb_width
{
    return self.frame.size.width;
}

- (void)setNb_width:(CGFloat)nb_width
{
    CGRect rect = self.frame;
    rect.size.width = nb_width;
    self.frame = rect;
    
}

- (CGFloat)nb_x
{
    return self.frame.origin.x;
}

- (void)setNb_x:(CGFloat)nb_x
{
    CGRect rect = self.frame;
    rect.origin.x = nb_x;
    self.frame = rect;
    
}

- (CGFloat)nb_y
{
    return self.frame.origin.y;
}
- (void)setNb_y:(CGFloat)nb_y
{
    CGRect rect = self.frame;
    rect.origin.y = nb_y;
    self.frame = rect;
    
}

@end
